package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties("handler")
public class Comment extends BaseDomain{
    public static final Integer TYPE_STRATEGY = 0; //攻略评论
    public static final Integer TYPE_TRAVEL = 1; //游记评论

    private User user;//发评论的用户

    private List<Label> labels;//评论标签

    private String content;//评论内容

    private List<Image> imgs;//评论图片

    private Integer star;//星级

    private Integer type=TYPE_STRATEGY;//评论类型

    private boolean status;//评论状态

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date lastCommentTime;//评论时间

    private String image;//传到后台的多张照片

    private String label;//传到后台的多个标签

    private Long userId;//用户id

    private Strategy stratagy;//攻略id

    private Long stratagyId;//攻略id

}